<?php

namespace app\common\validate;

use think\Validate;

class Featured extends Validate
{
    protected $rule = [
        ['type', 'require', '请选择分类'],
        ['title', 'require|max:20', '请填写标题|标题长度不能超过20'],
        ['url', 'require', '请填写链接地址'],
        ['image', 'require', '请上传图片']
    ];
    protected $scene = [
        'add' => ['type', 'title', 'url', 'image']
    ];
}